package com.nike.util;

import java.util.Random;
import java.util.UUID;

public class DeviceUtil {
	public static String getAndroidId() {
		Random random = new Random();
		return Integer.toHexString(random.nextInt()) + Integer.toHexString(random.nextInt()) + Integer.toHexString(random.nextInt());
	}
	public static String getAndroidId(int endInt){
        UUID uuid= UUID.randomUUID();
        String str = uuid.toString();
        String uuidStr=str.replace("-", "").substring(0,endInt);
        return uuidStr;
    }
	public static String getDeviceId() throws Exception{
        return aag.a();
    }
	public static String getDeviceId(String androidId,String build_id) throws Exception{
        return aag.aa(androidId,build_id);
    }
	public static String getIntRandom3(int length) {
        Random random = new Random();
        return random.nextInt(length)+""+random.nextInt(length)+""+random.nextInt(length);

    }
	public static void main(String[] args) throws Exception {
		// TODO Auto-generated method stub
//		System.out.println(getAndroidId());
//		System.out.println(getDeviceId2(getAndroidId(16)));
//		System.out.println(getIntRandom3(10));
//		SimpleDateFormat sdf = new SimpleDateFormat("EEE MMM dd HH:mm:ss zzz yyyy", Locale.US);
//		System.out.println(sdf.format(new Date()));
		System.out.println(aag.getAndroidId(6).toUpperCase());
//		System.out.println(aag.getAndroidId());
//		System.out.println(aag.a());
	}

}
